home *** CD-ROM | disk | FTP | other *** search
- "------------------------------------------------------------------"
- " Colors Class implements control of Amiga Color registers "
- " Chances are that Glyph is the wrong parent class for this class. "
- "------------------------------------------------------------------"
-
- Class Colors :Glyph ! private parentObj !
- [
- dispose
- <primitive 184 0 private>.
- ^ nil
- |
- loadColors: howMany from: colorMapFileName
- <primitive 184 2 parentObj howMany colorMapFileName>
- |
- getColor: srcType from: srcObject which: n
-
- " srcType 1 is WindowObject, all else is colorMapObject: "
-
- ^ <primitive 184 3 srcType srcObject n>
- |
- setColorReg: n red: r green: g blue: b
- <primitive 184 4 parentObj n r g b>
- |
- setMapValue: srcType from: srcObject num: n red: r green: g blue: b
-
- " srcType 1 is WindowObject, all else is colorMapObject: "
-
- <primitive 184 5 srcType srcObject n r g b>
- |
- copyMap: sourceObject to: destObject sourceType: srcType
-
- " srcType 1 is WindowObject (dest is ColorMap)
- * all else is colorMapObject (dest is WindowObject):
- "
-
- <primitive 184 6 sourceObject destObject srcType>
- |
- saveColorsTo: colorMapFileName
- <primitive 184 7 parentObj colorMapFileName>
- |
- makeColorMap: numColors
- private <- <primitive 184 1 private numColors>.
- ^ self
- |
- new: windowObject
- parentObj <- windowObject. "cmap <- Colors new: windowObj"
- private <- nil. " makeColorMap will initialize this"
- ^ self
- ]
-